/** 病害相关的数据库初始化 */
import { TAB_STATION } from "../config/common.js";

/** 初始化病害表 */
export const createStationsTable = db => {
	const sql = `
		create table if not exists '${TAB_STATION}'(
			id int primary key,
			_id varchar(64),
			pid varchar(64),
			mileage varchar(8),
			name varchar(64),
			type varchar(8),
			amount int,
			categoryId varchar(8),
			categoryName varchar(8),
			lineId varchar(8),
			lineName varchar(64),
			pmId varchar(8),
			pmName varchar(64),
			branchLineName varchar(64)
		);
	`;
	return db.execute(sql);
}